@using Seal.Model;
@{
    ReportViewTemplate Template = Model;

    //Template Name
    Template.Name = "Card";
    Template.Description = "View to display each model values in a single card.";

    //If true, the view can be configured for a report model
    Template.ForReportModel = true;

    //Parameters for this template
    Template.Parameters.Add(new Parameter() { Name = "card_show_name", BoolValue = true, DisplayName = "Show element name", Description = "If true, the element name is displayed in the card." });
    Template.Parameters.Add(new Parameter() { Name = "card_show_title", BoolValue = true, DisplayName = "Show title", Description = "If true, the title is displayed in the card." });
    Template.Parameters.Add(new Parameter() { Name = "card_title", Type = ViewParameterType.Text, DisplayName = "Title", Description = "Title of the card." });
    Template.Parameters.Add(new Parameter() { Name = "title_column", NumericValue = 0, DisplayName = "Column used for title", Description = "If set, the values of the column specified is used for the title of the card." });
    Template.Parameters.Add(new Parameter() { Name = "invert_name_title", BoolValue = false, DisplayName = "Invert name and title", Description = "If true, the texts of the element name and the title are inverted." });
    Template.Parameters.Add(new Parameter() { Name = "card_rows", NumericValue = 0, DisplayName = "Number of rows", Description = "The number of rows to use in the source table to generate the card. If 0, all rows are used." });
    Template.Parameters.Add(new Parameter() { Name = "card_columns", NumericValue = 0, DisplayName = "Number of columns", Description = "The number of columns to use in the source table to generate the card. If 0, all columns are used." });
    Template.Parameters.Add(new Parameter() { Name = "container_css", TextValue = "display:flex;\r\nflex-flow:row wrap;\r\njustify-content:center;", DisplayName = "Main container: CSS Style", Description = "CSS style attribute of the main container.", TextSamples = ReportViewTemplate.GridFlexContainerParameterSample });
    Template.Parameters.Add(new Parameter() { Name = "container_class", Value = "", DisplayName = "Main container: CSS Class", Description = "CSS class attribute of the main container.", Enums = new string[] { "alert alert-info", "alert alert-success", "text-left" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "card_css", Value = "width:300px; background:#F0F0F0; border: 1px solid #A1A1A1; margin:5px; border-radius:5px;", DisplayName = "Items Card Panel: CSS Style", Description = "CSS style attribute of the card DIV.", Enums = new string[] { "width:300px; height:400px;" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "card_class", Value = "text-center", DisplayName = "Items Card panel: CSS Class", Description = "CSS class attribute of the card DIV.", Enums = new string[] { "alert alert-info", "alert alert-success", "text-left" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "title_css", Value = "padding:5px;", DisplayName = "Title: CSS Style", Description = "CSS style attribute of the title.", Enums = new string[] { "width:400px;height:300px;page-break-inside:avoid;overflow:auto;", "page-break-inside:avoid;overflow:auto" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "title_class", Value = "text-left", DisplayName = "Title: CSS Class", Description = "CSS class attribute of the title.", Enums = new string[] { "alert alert-info", "alert alert-success" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "separator_css", Value = "background:#A1A1A1; height:1px;", DisplayName = "Separator: CSS Style", Description = "CSS style attribute of the separator.", Enums = new string[] { "width:400px;height:300px;page-break-inside:avoid;overflow:auto;", "page-break-inside:avoid;overflow:auto" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "separator_class", Value = "", DisplayName = "Separator: CSS Class", Description = "CSS class attribute of the separator.", Enums = new string[] { "alert alert-info", "alert alert-success" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "value_css", Value = "font-size: xx-large;", DisplayName = "Element value: CSS Style", Description = "CSS style attribute of the element value.", Enums = new string[] { "width:400px;height:300px;page-break-inside:avoid;overflow:auto;", "page-break-inside:avoid;overflow:auto" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "value_class", Value = "", DisplayName = "Element value: CSS Class", Description = "CSS class attribute of the element value.", Enums = new string[] { "alert alert-info", "alert alert-success" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "name_css", Value = "font-size: large;", DisplayName = "Element name: CSS Style", Description = "CSS style attribute of the element name.", Enums = new string[] { "width:400px;height:300px;page-break-inside:avoid;overflow:auto;" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "name_class", Value = "", DisplayName = "Element name: CSS Class", Description = "CSS class attribute of the element name.", Enums = new string[] { "alert alert-info", "alert alert-success" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "print_break_after_view", DisplayName = "Print: Force a break after the view", BoolValue = false, Description = "If true, a new page is started after the view is displayed for the print layout." });

    //Allowed template parent names
    Template.ParentNames = new List<string>() { "Report", "Tab Page", "Container", "Container Grid Flex", "Widget" };
}